package com.ruoyi.huanghefd.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 动火工作票
 * @TableName worksheet_dh
 */
@TableName(value ="worksheet_dh")
@Data
public class WorksheetDh implements Serializable {
    /**
     * ID
     */
    private String dhId;

    /**
     * 工作票编号
     */
    private String dhCode;

    /**
     * 工作票类型，见码值
     */
    private String dhType;

    /**
     * 工作票状态；-2作废，-1-暂存，0-正在执行票，1-已执行票，2-工作终结票，3-典型票，4-终止票,5-押票箱
     */
    private Integer dhState;

    /**
     * 单位
     */
    private String dhOrgid;

    /**
     * 单位
     */
    private String dhOrg;

    /**
     * 工作负责人ID
     */
    private String dhPrincipalid;

    /**
     * 工作负责人
     */
    private String dhPrincipal;

    /**
     * 工作部门、班组
     */
    private String dhDeptid;

    /**
     * 工作部门、班组
     */
    private String dhDept;

    /**
     * 地点和设备（系统）名称
     */
    private String placeDevice;

    /**
     * 动火工作内容
     */
    private String content;

    /**
     * 动火方式：A-电焊，B-电割，C-气焊，D-气割，E-金弧焊，F-研磨一切割，G-易燃物的使用，H-其他
     */
    private String dhMode;

    /**
     * 运行部门应采取的安全措施
     */
    private String runSafetyMeasures;

    /**
     * 动火部门应采取的安全措施
     */
    private String dhSafetyMeasures;

    /**
     * 申请动火的开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date applyDhBegintime;

    /**
     * 申请动火的结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date applyDhEndtime;

    /**
     * 动火工作票签发人ID
     */
    private String dhSignerid;

    /**
     * 动火工作票签发人
     */
    private String dhSigner;

    /**
     * 动火工作票签发人签名时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dhSignerDate;

    /**
     * 企业消防管理部门负责人签名ID
     */
    private String firePrincipalid;

    /**
     * 企业消防管理部门负责人签名
     */
    private String firePrincipal;

    /**
     * 企业安监部门负责人签名ID
     */
    private String safetyPrincipalid;

    /**
     * 企业安监部门负责人签名
     */
    private String safetyPrincipal;

    /**
     *  企业分管生产技术的领导签名id
     */
    private String technologyPrincipalid;

    /**
     *  企业分管生产技术的领导签名
     */
    private String technologyPrincipal;

    /**
     * 批准动火工作开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date approveStarttime;

    /**
     * 批准动火工作结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date approveEndtime;

    /**
     * 运行许可动火时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date runDhlicenseDate;

    /**
     * 运行许可人签名id
     */
    private String runWslicensorid;

    /**
     * 运行许可人签名
     */
    private String runWslicensor;

    /**
     * 可燃性、易爆气体含量合格测定值
     */
    private String testValue;

    /**
     * 动火执行人签名id
     */
    private String dhExecutorid;

    /**
     * 动火执行人签名
     */
    private String dhExecutor;

    /**
     * 消防监护人签名id
     */
    private String fireGuardianid;

    /**
     * 消防监护人签名
     */
    private String fireGuardian;

    /**
     * 动火部门负责人ID
     */
    private String depPrincipalid;

    /**
     * 动火部门负责人
     */
    private String depPrincipal;

    /**
     * 允许动火工作开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date allowStarttime;

    /**
     * 允许动火工作结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date allowEndtime;

    /**
     * 终结动火执行人
     */
    private String dhOverExecutor;
    /**
     * 终结动火执行人ID
     */
    private String dhOverExecutorid;
    /**
     * 终结消防监护人
     */
    private String fireOverGuardian;
    /**
     * 终结消防监护人ID
     */
    private String fireOverGuardianid;
    /**
     * 终结动火工作负责人
     */
    private String dhOverPrincipal;
    /**
     * 终结动火工作负责人ID
     */
    private String dhOverPrincipalid;
    /**
     * 终结运行许可人
     */
    private String runOverWslicensor;
    /**
     * 终结运行许可人签名ID
     */
    private String runOverWslicensorid;

    /**
     * 对应的检修工作票编号
     */
    private String relaWsCode;

    /**
     * 其他事项
     */
    private String others;

    /**
     * 备注
     */
    private String remark;
    /**
     * 当前环节
     */
    private String currStep;

    /**
     * 当前环节接收人
     */
    private String currReceiverid;
    /**
     * 接收人
     */
    private String currReceiver;
    /**
     * @Author gnplum
     * @Description //子表-执行人和操作证编号
     * @Date 16:15 2023/11/12
     * @param null
    * @return 
     * @return null
    **/
    private List<WorksheetDhExc> exc;
    /**
     * @Author gnplum
     * @Description //子表-检测记录
     * @Date 16:15 2023/11/12
     * @param null
     * @return
     * @return null
     **/
    private List<WorksheetDhLog> log;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WorksheetDh other = (WorksheetDh) that;
        return (this.getDhId() == null ? other.getDhId() == null : this.getDhId().equals(other.getDhId()))
            && (this.getDhCode() == null ? other.getDhCode() == null : this.getDhCode().equals(other.getDhCode()))
            && (this.getDhType() == null ? other.getDhType() == null : this.getDhType().equals(other.getDhType()))
            && (this.getDhState() == null ? other.getDhState() == null : this.getDhState().equals(other.getDhState()))
            && (this.getDhOrgid() == null ? other.getDhOrgid() == null : this.getDhOrgid().equals(other.getDhOrgid()))
            && (this.getDhOrg() == null ? other.getDhOrg() == null : this.getDhOrg().equals(other.getDhOrg()))
            && (this.getDhPrincipalid() == null ? other.getDhPrincipalid() == null : this.getDhPrincipalid().equals(other.getDhPrincipalid()))
            && (this.getDhPrincipal() == null ? other.getDhPrincipal() == null : this.getDhPrincipal().equals(other.getDhPrincipal()))
            && (this.getDhDeptid() == null ? other.getDhDeptid() == null : this.getDhDeptid().equals(other.getDhDeptid()))
            && (this.getDhDept() == null ? other.getDhDept() == null : this.getDhDept().equals(other.getDhDept()))
            && (this.getPlaceDevice() == null ? other.getPlaceDevice() == null : this.getPlaceDevice().equals(other.getPlaceDevice()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getDhMode() == null ? other.getDhMode() == null : this.getDhMode().equals(other.getDhMode()))
            && (this.getRunSafetyMeasures() == null ? other.getRunSafetyMeasures() == null : this.getRunSafetyMeasures().equals(other.getRunSafetyMeasures()))
            && (this.getDhSafetyMeasures() == null ? other.getDhSafetyMeasures() == null : this.getDhSafetyMeasures().equals(other.getDhSafetyMeasures()))
            && (this.getApplyDhBegintime() == null ? other.getApplyDhBegintime() == null : this.getApplyDhBegintime().equals(other.getApplyDhBegintime()))
            && (this.getApplyDhEndtime() == null ? other.getApplyDhEndtime() == null : this.getApplyDhEndtime().equals(other.getApplyDhEndtime()))
            && (this.getDhSignerid() == null ? other.getDhSignerid() == null : this.getDhSignerid().equals(other.getDhSignerid()))
            && (this.getDhSigner() == null ? other.getDhSigner() == null : this.getDhSigner().equals(other.getDhSigner()))
            && (this.getDhSignerDate() == null ? other.getDhSignerDate() == null : this.getDhSignerDate().equals(other.getDhSignerDate()))
            && (this.getFirePrincipalid() == null ? other.getFirePrincipalid() == null : this.getFirePrincipalid().equals(other.getFirePrincipalid()))
            && (this.getFirePrincipal() == null ? other.getFirePrincipal() == null : this.getFirePrincipal().equals(other.getFirePrincipal()))
            && (this.getSafetyPrincipalid() == null ? other.getSafetyPrincipalid() == null : this.getSafetyPrincipalid().equals(other.getSafetyPrincipalid()))
            && (this.getSafetyPrincipal() == null ? other.getSafetyPrincipal() == null : this.getSafetyPrincipal().equals(other.getSafetyPrincipal()))
            && (this.getTechnologyPrincipalid() == null ? other.getTechnologyPrincipalid() == null : this.getTechnologyPrincipalid().equals(other.getTechnologyPrincipalid()))
            && (this.getTechnologyPrincipal() == null ? other.getTechnologyPrincipal() == null : this.getTechnologyPrincipal().equals(other.getTechnologyPrincipal()))
            && (this.getApproveStarttime() == null ? other.getApproveStarttime() == null : this.getApproveStarttime().equals(other.getApproveStarttime()))
            && (this.getApproveEndtime() == null ? other.getApproveEndtime() == null : this.getApproveEndtime().equals(other.getApproveEndtime()))
            && (this.getRunDhlicenseDate() == null ? other.getRunDhlicenseDate() == null : this.getRunDhlicenseDate().equals(other.getRunDhlicenseDate()))
            && (this.getRunWslicensorid() == null ? other.getRunWslicensorid() == null : this.getRunWslicensorid().equals(other.getRunWslicensorid()))
            && (this.getRunWslicensor() == null ? other.getRunWslicensor() == null : this.getRunWslicensor().equals(other.getRunWslicensor()))
            && (this.getTestValue() == null ? other.getTestValue() == null : this.getTestValue().equals(other.getTestValue()))
            && (this.getDhExecutorid() == null ? other.getDhExecutorid() == null : this.getDhExecutorid().equals(other.getDhExecutorid()))
            && (this.getDhExecutor() == null ? other.getDhExecutor() == null : this.getDhExecutor().equals(other.getDhExecutor()))
            && (this.getFireGuardianid() == null ? other.getFireGuardianid() == null : this.getFireGuardianid().equals(other.getFireGuardianid()))
            && (this.getFireGuardian() == null ? other.getFireGuardian() == null : this.getFireGuardian().equals(other.getFireGuardian()))
            && (this.getDepPrincipalid() == null ? other.getDepPrincipalid() == null : this.getDepPrincipalid().equals(other.getDepPrincipalid()))
            && (this.getDepPrincipal() == null ? other.getDepPrincipal() == null : this.getDepPrincipal().equals(other.getDepPrincipal()))
            && (this.getAllowStarttime() == null ? other.getAllowStarttime() == null : this.getAllowStarttime().equals(other.getAllowStarttime()))
            && (this.getAllowEndtime() == null ? other.getAllowEndtime() == null : this.getAllowEndtime().equals(other.getAllowEndtime()))
            && (this.getRelaWsCode() == null ? other.getRelaWsCode() == null : this.getRelaWsCode().equals(other.getRelaWsCode()))
            && (this.getOthers() == null ? other.getOthers() == null : this.getOthers().equals(other.getOthers()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDhId() == null) ? 0 : getDhId().hashCode());
        result = prime * result + ((getDhCode() == null) ? 0 : getDhCode().hashCode());
        result = prime * result + ((getDhType() == null) ? 0 : getDhType().hashCode());
        result = prime * result + ((getDhState() == null) ? 0 : getDhState().hashCode());
        result = prime * result + ((getDhOrgid() == null) ? 0 : getDhOrgid().hashCode());
        result = prime * result + ((getDhOrg() == null) ? 0 : getDhOrg().hashCode());
        result = prime * result + ((getDhPrincipalid() == null) ? 0 : getDhPrincipalid().hashCode());
        result = prime * result + ((getDhPrincipal() == null) ? 0 : getDhPrincipal().hashCode());
        result = prime * result + ((getDhDeptid() == null) ? 0 : getDhDeptid().hashCode());
        result = prime * result + ((getDhDept() == null) ? 0 : getDhDept().hashCode());
        result = prime * result + ((getPlaceDevice() == null) ? 0 : getPlaceDevice().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getDhMode() == null) ? 0 : getDhMode().hashCode());
        result = prime * result + ((getRunSafetyMeasures() == null) ? 0 : getRunSafetyMeasures().hashCode());
        result = prime * result + ((getDhSafetyMeasures() == null) ? 0 : getDhSafetyMeasures().hashCode());
        result = prime * result + ((getApplyDhBegintime() == null) ? 0 : getApplyDhBegintime().hashCode());
        result = prime * result + ((getApplyDhEndtime() == null) ? 0 : getApplyDhEndtime().hashCode());
        result = prime * result + ((getDhSignerid() == null) ? 0 : getDhSignerid().hashCode());
        result = prime * result + ((getDhSigner() == null) ? 0 : getDhSigner().hashCode());
        result = prime * result + ((getDhSignerDate() == null) ? 0 : getDhSignerDate().hashCode());
        result = prime * result + ((getFirePrincipalid() == null) ? 0 : getFirePrincipalid().hashCode());
        result = prime * result + ((getFirePrincipal() == null) ? 0 : getFirePrincipal().hashCode());
        result = prime * result + ((getSafetyPrincipalid() == null) ? 0 : getSafetyPrincipalid().hashCode());
        result = prime * result + ((getSafetyPrincipal() == null) ? 0 : getSafetyPrincipal().hashCode());
        result = prime * result + ((getTechnologyPrincipalid() == null) ? 0 : getTechnologyPrincipalid().hashCode());
        result = prime * result + ((getTechnologyPrincipal() == null) ? 0 : getTechnologyPrincipal().hashCode());
        result = prime * result + ((getApproveStarttime() == null) ? 0 : getApproveStarttime().hashCode());
        result = prime * result + ((getApproveEndtime() == null) ? 0 : getApproveEndtime().hashCode());
        result = prime * result + ((getRunDhlicenseDate() == null) ? 0 : getRunDhlicenseDate().hashCode());
        result = prime * result + ((getRunWslicensorid() == null) ? 0 : getRunWslicensorid().hashCode());
        result = prime * result + ((getRunWslicensor() == null) ? 0 : getRunWslicensor().hashCode());
        result = prime * result + ((getTestValue() == null) ? 0 : getTestValue().hashCode());
        result = prime * result + ((getDhExecutorid() == null) ? 0 : getDhExecutorid().hashCode());
        result = prime * result + ((getDhExecutor() == null) ? 0 : getDhExecutor().hashCode());
        result = prime * result + ((getFireGuardianid() == null) ? 0 : getFireGuardianid().hashCode());
        result = prime * result + ((getFireGuardian() == null) ? 0 : getFireGuardian().hashCode());
        result = prime * result + ((getDepPrincipalid() == null) ? 0 : getDepPrincipalid().hashCode());
        result = prime * result + ((getDepPrincipal() == null) ? 0 : getDepPrincipal().hashCode());
        result = prime * result + ((getAllowStarttime() == null) ? 0 : getAllowStarttime().hashCode());
        result = prime * result + ((getAllowEndtime() == null) ? 0 : getAllowEndtime().hashCode());
        result = prime * result + ((getRelaWsCode() == null) ? 0 : getRelaWsCode().hashCode());
        result = prime * result + ((getOthers() == null) ? 0 : getOthers().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", dhId=").append(dhId);
        sb.append(", dhCode=").append(dhCode);
        sb.append(", dhType=").append(dhType);
        sb.append(", dhState=").append(dhState);
        sb.append(", dhOrgid=").append(dhOrgid);
        sb.append(", dhOrg=").append(dhOrg);
        sb.append(", dhPrincipalid=").append(dhPrincipalid);
        sb.append(", dhPrincipal=").append(dhPrincipal);
        sb.append(", dhDeptid=").append(dhDeptid);
        sb.append(", dhDept=").append(dhDept);
        sb.append(", placeDevice=").append(placeDevice);
        sb.append(", content=").append(content);
        sb.append(", dhMode=").append(dhMode);
        sb.append(", runSafetyMeasures=").append(runSafetyMeasures);
        sb.append(", dhSafetyMeasures=").append(dhSafetyMeasures);
        sb.append(", applyDhBegintime=").append(applyDhBegintime);
        sb.append(", applyDhEndtime=").append(applyDhEndtime);
        sb.append(", dhSignerid=").append(dhSignerid);
        sb.append(", dhSigner=").append(dhSigner);
        sb.append(", dhSignerDate=").append(dhSignerDate);
        sb.append(", firePrincipalid=").append(firePrincipalid);
        sb.append(", firePrincipal=").append(firePrincipal);
        sb.append(", safetyPrincipalid=").append(safetyPrincipalid);
        sb.append(", safetyPrincipal=").append(safetyPrincipal);
        sb.append(", technologyPrincipalid=").append(technologyPrincipalid);
        sb.append(", technologyPrincipal=").append(technologyPrincipal);
        sb.append(", approveStarttime=").append(approveStarttime);
        sb.append(", approveEndtime=").append(approveEndtime);
        sb.append(", runDhlicenseDate=").append(runDhlicenseDate);
        sb.append(", runWslicensorid=").append(runWslicensorid);
        sb.append(", runWslicensor=").append(runWslicensor);
        sb.append(", testValue=").append(testValue);
        sb.append(", dhExecutorid=").append(dhExecutorid);
        sb.append(", dhExecutor=").append(dhExecutor);
        sb.append(", fireGuardianid=").append(fireGuardianid);
        sb.append(", fireGuardian=").append(fireGuardian);
        sb.append(", depPrincipalid=").append(depPrincipalid);
        sb.append(", depPrincipal=").append(depPrincipal);
        sb.append(", allowStarttime=").append(allowStarttime);
        sb.append(", allowEndtime=").append(allowEndtime);
        sb.append(", relaWsCode=").append(relaWsCode);
        sb.append(", others=").append(others);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}